﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Verse;

namespace Meow
{
    public class JobHediffDef : Def
    {
        public ThingDef targetRace = new ThingDef();

        public List<JobDef> jobDefs = new List<JobDef>();

        public List<HediffDef> hediffDefs = new List<HediffDef>();

        public int tickMultiflier = 1000;

        public float hediffSeverity = 0.01f;

        public string maxHediffSevertyMessage;
    }


    [StaticConstructorOnStartup]
    public class AddComp
    {
        static AddComp()
        {
            foreach (JobHediffDef allDef in DefDatabase<JobHediffDef>.AllDefs)
            {
                CompProperties_JobHediff item = new CompProperties_JobHediff
                {
                    jobDefs = allDef.jobDefs,
                    hediffDefs = allDef.hediffDefs,
                    targetRace = allDef.targetRace,
                    ticksToHediff = allDef.tickMultiflier,
                    hediffSeverity = allDef.hediffSeverity,
                    maxHediffSevertyMessage = allDef.maxHediffSevertyMessage
                };
                allDef.targetRace.comps.Add(item);
            }
        }
    }
}
